<template>
  <div class="app-container">
    <el-card class="box-card">
      <template #header>
        <div class="card-header">
          <span>菜品列表</span>
          <el-button type="primary">添加菜品</el-button>
        </div>
      </template>
      
      <el-table :data="tableData" style="width: 100%">
        <el-table-column prop="id" label="ID" width="80" />
        <el-table-column prop="name" label="菜品名称" />
        <el-table-column prop="category" label="分类" />
        <el-table-column prop="price" label="价格" />
        <el-table-column prop="status" label="状态" />
        <el-table-column label="操作" width="200">
          <template #default="scope">
            <el-button size="small">编辑</el-button>
            <el-button size="small" type="danger">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      
      <div class="pagination-container" style="margin-bottom: 100px;">
        <el-pagination
          layout="prev, pager, next"
          :total="100"
          :page-size="10"
        />
      </div>

    </el-card>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const tableData = ref([
  {
    id: 1,
    name: '宫保鸡丁',
    category: '川菜',
    price: '28.00',
    status: '在售'
  },
  {
    id: 2,
    name: '鱼香肉丝',
    category: '川菜',
    price: '25.00',
    status: '在售'
  },
  {
    id: 3,
    name: '麻婆豆腐',
    category: '川菜',
    price: '18.00',
    status: '在售'
  }
])
</script>

<style lang="less" scoped>
.app-container {
  // background-color: #fff;


  
  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
  }
}
.box-card{
  border-radius: 10px;
}
</style>